<template>
	<view class="container">
		<view>
			<uni-section title="基本信息" type="circle">
				<uni-list>
					<uni-list-item title="姓名" :rightText="detail.name" />
					<uni-list-item title="工号" :rightText="detail.uid" />
					<uni-list-item title="月份" :rightText="detail.yuefen" />
				</uni-list>
			</uni-section>

			<uni-section title="基本工资" type="circle">
				<uni-list>
					<uni-list-item v-if="detail.gangweigongzi > 0" title="岗位工资" :rightText="detail.gangweigongzi || '0'" />
					<uni-list-item v-if="detail.xinjigongzi > 0" title="薪级工资" :rightText="detail.xinjigongzi || '0'" />
					<uni-list-item v-if="detail.gangweijintie > 0" title="岗位津贴" :rightText="detail.gangweijintie || '0'" />
				</uni-list>
			</uni-section>

			<uni-section title="其他项目" type="circle">
				<uni-list>
					<uni-list-item v-if="detail.shenghuobutie > 0" title="生活补贴" :rightText="detail.shenghuobutie || '0'" />
					<uni-list-item v-if="detail.jichuzenghe > 0" title="基础增核" :rightText="detail.jichuzenghe || '0'" />
					<uni-list-item v-if="detail.jiaotongbutie > 0" title="交通补贴" :rightText="detail.jiaotongbutie || '0'" />
					<uni-list-item v-if="detail.yibu > 0" title="医疗补贴" :rightText="detail.yibu || '0'" />
					<uni-list-item v-if="detail.tegangjintie > 0" title="特岗津贴" :rightText="detail.tegangjintie || '0'" />
					<uni-list-item v-if="detail.gongwujiaotongbutie > 0" title="公务交通补贴" :rightText="detail.gongwujiaotongbutie || '0'" />
					<uni-list-item v-if="detail.zhufangbutie > 0" title="住房补贴" :rightText="detail.zhufangbutie || '0'" />
				</uni-list>
			</uni-section>
			<uni-section title="其他收入" type="circle">
				<uni-list>
					<uni-list-item v-if="detail.jianglixingjixiao > 0" title="奖励性绩效" :rightText="detail.jianglixingjixiao || '0'" />
					<uni-list-item v-if="detail.niandijianglixingjixiao > 0" title="年底奖励性绩效" :rightText="detail.niandijianglixingjixiao || '0'" />
					<uni-list-item v-if="detail.zengliangjixiao > 0" title="增量绩效" :rightText="detail.zengliangjixiao || '0'" />
					<uni-list-item v-if="detail.bufagangweigongzi > 0" title="补发岗位工资" :rightText="detail.bufagangweigongzi || '0'" />
					<uni-list-item v-if="detail.bufaxinji > 0" title="补发薪级" :rightText="detail.bufaxinji || '0'" />
					<uni-list-item v-if="detail.bufagangweijintie > 0" title="补发岗位津贴" :rightText="detail.bufagangweijintie || '0'" />
					<uni-list-item v-if="detail.bufajichuzenghe > 0" title="补发基础增核" :rightText="detail.bufajichuzenghe || '0'" />
					<uni-list-item v-if="detail.bufategangjintie > 0" title="补发特岗津贴" :rightText="detail.bufategangjintie || '0'" />
					<uni-list-item v-if="detail.bufazhufangbutie > 0" title="补发住房补贴" :rightText="detail.bufazhufangbutie || '0'" />
				</uni-list>
			</uni-section>

			<uni-section title="扣减项目" type="circle">
				<uni-list style="color: indianred;">
					<uni-list-item v-if="detail.yanglaobaoxian > 0" title="养老保险" :rightText="detail.yanglaobaoxian || '0'" />
					<uni-list-item v-if="detail.zhiyenianjin > 0" title="职业年金" :rightText="detail.zhiyenianjin || '0'" />
					<uni-list-item v-if="detail.yibao > 0" title="医保" :rightText="detail.yibao || '0'" />
					<uni-list-item v-if="detail.gongjijin > 0" title="公积金" :rightText="detail.gongjijin || '0'" />
					<uni-list-item v-if="detail.gonghuihuifei > 0" title="工会会费" :rightText="detail.gonghuihuifei || '0'" />
					<uni-list-item v-if="detail.yukougeshui > 0" title="预扣个税" :rightText="detail.yukougeshui || '0'" />
					<uni-list-item v-if="detail.bukouyanglaobaoxian > 0" title="补扣养老保险" :rightText="detail.bukouyanglaobaoxian || '0'" />
					<uni-list-item v-if="detail.bukouzhiyenianjin > 0" title="补扣职业年金" :rightText="detail.bukouzhiyenianjin || '0'" />
					<uni-list-item v-if="detail.bukougongjijin > 0" title="补扣公积金" :rightText="detail.bukougongjijin || '0'" />
				</uni-list>
			</uni-section>
			<uni-section title="汇总" type="circle">
				<uni-list>
					<uni-list-item v-if="detail.yingfagongzi > 0" title="应发合计" :rightText="detail.yingfagongzi" />
					<uni-list-item title="扣款合计"
						:rightText="(detail.yanglaobaoxian+detail.zhiyenianjin+detail.yibao+detail.gongjijin+detail.gonghuihuifei+detail.yukougeshui+detail.bukouyanglaobaoxian+detail.bukouzhiyenianjin+detail.bukougongjijin).toFixed(2)" />
					<uni-list-item v-if="detail.shifagongzi > 0" title="实发工资" :rightText="detail.shifagongzi" />
				</uni-list>
			</uni-section>
			<uni-section title="备注" type="circle">
				<uni-list>
					<uni-list-item :title="detail.remark" />
				</uni-list>
			</uni-section>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: {}
			}
		},
		onLoad(params) {
			this.detail = JSON.parse(params.detail)
			console.log(this.detail)
		},
		methods: {

		}
	}
</script>

<style>
	.container {
		padding: 20px 10px 20px 10px;
		line-height: 24px;
		background-image: url(/static/login/bg.png);
		background-repeat: no-repeat;
		background-size: 100%;
	}

	.text-t {
		font-size: 15px;
	}

	.text-b {
		font-weight: bold;
		font-size: 15px;
		text-align: right;
	}

	.text-r {
		font-weight: bold;
		font-size: 15px;
		color: indianred;
		text-align: right;
	}
</style>
